import request from '@/utils/request'

export default {
  pageUnitBycondition(current, limit, unitQuery) {
    return request({
      url: `/current-unit/pageUnitByConditon/${current}/${limit}`,
      method: 'post',
      data: unitQuery,
    })
  },
  deleteUnitById(ids) {
    return request({
      url: `/current-unit/delUnit/${ids}`,
      method: 'get',
      data: ids
    })
  },
  saveUnit(unit) {
    return request({
      url: `/current-unit/saveUnit`,
      method: 'post',
      data: unit
    })
  },
  updateUnitById(unit) {
    return request({
      url: `/current-unit/updateUnit`,
      method: `post`,
      data: unit
    })
  },
  findUnitById(id) {
    return request({
      url: `/current-unit/findUnitById/${id}`,
      method: 'get'
    })
  },
  findOne() {
    return request({
      url: `/current-unit/selOne`,
      method: 'get'
    })
  }

}
